package com.sugar.psych.assessment.module.business.dal.mysql.medal;

import java.util.*;

import com.sugar.psych.assessment.framework.common.pojo.PageResult;
import com.sugar.psych.assessment.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.sugar.psych.assessment.framework.mybatis.core.mapper.BaseMapperX;
import com.sugar.psych.assessment.module.business.dal.dataobject.medal.MedalDO;
import org.apache.ibatis.annotations.Mapper;
import com.sugar.psych.assessment.module.business.controller.admin.medal.vo.*;

/**
 * 勋章信息 Mapper
 *
 * @author Ysugar
 */
@Mapper
public interface MedalMapper extends BaseMapperX<MedalDO> {

    default PageResult<MedalDO> selectPage(MedalPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<MedalDO>()
                .likeIfPresent(MedalDO::getName, reqVO.getName())
                .betweenIfPresent(MedalDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(MedalDO::getId));
    }

}